home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / keyedlists / keylget < prev    next >
Encoding:
Text File  |  1993-10-26  |  1.0 KB  |  21 lines  |  [TEXT/$Tcl]

  1.  
  2.  
  3.           keylget listvar ?key? ?retvar | {}?
  4.                Return the value associated with  key  from  the  keyed
  5.                list  in the variable listvar.  If retvar is not speci-
  6.                fied, then the value will be returned as the result  of
  7.                the  command.  In this case, if key is not found in the
  8.                list, an error will result.
  9.  
  10.                If retvar is specified and key is in the list, then the
  11.                value  is  returned in the variable retvar and the com-
  12.                mand returns 1 if the key was present within the  list.
  13.                If  key  isn't  in the list, the command will return 0,
  14.                and retvar will be left unchanged.  If {} is  specified
  15.                for retvar, the value is not returned, allowing the Tcl
  16.                programmer to determine if a key is present in a  keyed
  17.                list without setting a variable as a side-effect.
  18.  
  19.                If key is omitted, then a list of all the keys  in  the
  20.                keyed list is returned.
  21.